|
|
|
|
|
|
|
Bulletin boards and online services are excellent sources of inexpensive images. Some of these services make literally millions of images available. Images from online services are often copyrighted by the service or the contributor of the images. This is not a problem if you want the images for your own use. You should not use them in software or anything else that you will distribute to others unless you get permission from the copyright holder first. |
|
|
|
|
|
|
|
|
The Internet and the World Wide Web are also good sources of inexpensive images. Many companies and government agencies have impressive graphics at their ftp and Web sites. The NASA Web site at www.nasa.gov, for example, contains thousands of pictures of aircraft, spacecraft, planets, stars, comets, and so forth. The White House Web page at www.whitehouse.govcontains images of the White House, president, first lady, and vice president. From these locations, you can follow links to many other interesting government Web sites. Some of the images you find on the Web are copyrighted, though many of the government images are not. If you want to distribute an image, contact the image provider to see if you need permission. |
|
|
|
|
|
|
|
|
Many copy, graphic arts, and photographic stores can put your own photographs on disk for a reasonable fee. They typically give you software to view and manipulate the images with your first order. This service is ideal if you have one or two old photographs you would like to use on your computer. Because these are your photographs, you do not need someone else's permission to use them. |
|
|
|
|
|
|
|
|
Finally, some film developers will put images on disk for you when they develop your film. For a reasonable fee, they develop your film and send you prints or slides plus your pictures on disk. If you want electronic copies of all of the pictures in a roll of film, this kind of service is more convenient and probably cheaper than having a copy store scan your photographs one at a time. |
|
|
|
|
|
|
|
|
Visual Basic's image processing tools are somewhat limited. Probably the most useful of these are the LoadPicture and SavePicture routines. The Point and PSet routines let you examine the pixels in an image one at a time. These routines are easy to use, but they are relatively slow. A few calls to API routines can make pixel processing much faster. The following sections describe these methods in some detail. |
|
|
|
|
|
|
|
|
The LoadPicture function loads a picture from a graphic file. Typically, you use this function to set the Picture property of a form, image control, or picture box control. For example, the following code loads the image stored in the file C:\Images\Planet.bmp into the background of a form named frmPlanet: |
|
|
|
 |
|
|
|
|
frmPlanet.Picture = LoadPicture("C:\Images\Planet.bmp") |
|
|
|
|
|
|
|
|
Similarly, you can use LoadPicture to assign images to a form's Icon or to a control's DragIcon property. |
|
|
|
|
|